﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ECI.LIP.Entities;

namespace ECI.LIP.Management
{
    public class MesMaterManage
    {

        public string GetFirstStep(string bizType)
        {
            string sql = string.Format("select * from SYS_STEP_PARAMETERS t where t.workflow_type='{0}' and t.control_flag='100000000'", bizType);
            SysStepParameters step = new SysStepParameters();
            step = step.FetchEntity(sql);
            return step.StepId;

        }
        public string GetNextStep(HandleType ht, StepProcess currentSetp)
        {
            //List<string> lstSql = new List<string>();
            string sql = string.Format("select * from SYS_STEP_CONFIG t where t.crnt_step_id='{0}' and oper_type='{1}'", currentSetp.ToString(), ht.ToString());
            SysStepConfig step = new SysStepConfig();
            step = step.FetchEntity(sql);
            return step.NextStepId;
        }
    }
}
